package lab02.test03;

/**
 * Created by dell on 2017/10/12.
 */
public class Student {
    //属性：计算机成绩、数学成绩、英语成绩
    float computerscore;
    float mathscore;
    float englishscore;

    //行为:求总分、平均分、最高分、最低分
    float sum(){
        return computerscore+mathscore+englishscore;
    }
    float average(){
        return (computerscore+mathscore+englishscore);
    }
    float max(){
        float max;
        if (computerscore > mathscore)
            max = computerscore;
        else
            max = mathscore;
        if (max>englishscore)
        max = mathscore;
        else
        max=englishscore;
        return max;
    }


    float min() {
        float min;
        if (computerscore < mathscore)
            min = computerscore;
        else
            min = mathscore;
        if (min <englishscore)
            min = mathscore;
        else
            min=englishscore;
        return min;
    }


    void printStudent(){
        System.out.println("计算机成绩"+computerscore);
        System.out.println("数学成绩"+mathscore);
        System.out.println("英语成绩"+englishscore);
    }

        //构造函数
    //main函数
}
